package com.taxshare.seller.service;

import com.taxshare.seller.remote.ApiClientService;
import com.taxshare.seller.util.SpringBeanUtil;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;
import java.util.TimerTask;

/**
 * @ClassName: UpdatePdfTaskTimer
 * @Description:
 * @author: luozhongyi
 * @date: 2021/8/1 16:33
 */
public class UpdatePdfUrlTaskTimer extends TimerTask {

    private Map<String, String> map;

    @Autowired
    ApiClientService apiClientService;

    @Autowired
    OpenInvoiceService openInvoiceService;

    public UpdatePdfUrlTaskTimer(Map<String, String> reqMap) {
        map = reqMap;
    }

    {
        openInvoiceService = (OpenInvoiceService) SpringBeanUtil.getBeanById("openInvoiceService");
    }

    @Override
    public void run() {
        //更新pdfUrl
        openInvoiceService.CallUpdatePdfUrl(map);
    }

}
